import 'package:flutter/material.dart';
import 'package:flutter_base_widget/base/base.dart';

class CardPage extends BasePage {
  @override
  // TODO: implement title
  String get title => 'Card';

  Widget _createCard(ShapeBorder shapeBorder){
    return Card(
        shape: shapeBorder,
        clipBehavior: Clip.antiAlias,
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            const ListTile(
              leading: Icon(Icons.album),
              title: Text('The Enchanted Nightingale'),
              subtitle: Text('Music by Julie Gable. Lyrics by Sidney Stein.'),
            ),
            
            ButtonBar(
              children: <Widget>[
                FlatButton(
                  child: const Text('BUY TICKETS'),
                  onPressed: () { /* ... */ },
                ),
                FlatButton(
                  child: const Text('LISTEN'),
                  onPressed: () { /* ... */ },
                ),
              ],
            ),
          ],
        ),
      );
  }
  @override
  Widget rebuild(BuildContext context) {
    return Column(
      children: <Widget>[
        _createCard(null),
        _createCard(RoundedRectangleBorder(borderRadius: BorderRadius.circular(20))),
        _createCard(CircleBorder()),
      ],
    );
  }
}